home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / ACORNUSERS / CBSA / COMPUTER / POKEID / !ReadMe next >
Text File  |  1998-10-14  |  6KB  |  170 lines

  1. Kasoft Software
  2. Poke Machine Identification Module Notes
  3. Copyright © Kasoft Software 1997, 1998
  4. Notes written by Kade Hansson
  5.  
  6.  
  7. Overview
  8. ========
  9.  
  10. The PokeMachineID module replaces part of the OS_ReadSysInfo (SWI &58) call to allow the information returned by reason code 2 to be dynamically altered. This allows software containing hardware dependent code which uses this call to be tested.
  11.  
  12.  
  13. Requirements
  14. ============
  15.  
  16. PokeMachineID has been tested on a RiscPC with RISC OS 3.50 running on an ARM610. It may not work on earlier or later machines, as it patches the kernel SWI dispatch table in RAM (and this practice was introduced in the RiscPC due to the SVC32 SWI vector under ARM6, ARM7 and StrongARM). Should this table not exist at the desired location, PokeMachineID will alter the wrong addresses, with potentially disasterous results.
  17.  
  18. PokeMachineID requires the KaData utility module, a freeware version of which is provided. PokeMachineID also requires OS_SynchroniseCodeAreas (SWI &6E) as it uses dynamic code. For users of non-StrongARM RISC OS versions, a CallASWI module will therefore be required. There are a number of versions of this about:
  19.  
  20. 0.00    CallASWI (18 Sep 1996) [SVC26] © Kasoft
  21.     (Do not use- unreliable. Used for in-house tests only.)
  22. 0.00    CallASWI (18 Sep 1996) [SVC32] © Kasoft
  23.     (Do not use- unreliable. Used for in-house tests only.)
  24. 0.00    CallASWI (25 Oct 1996) Written by Darren Salt
  25.     (Implements new SWI names)
  26. 0.01    CallASWI (17 Jul 1996) Acorn official version
  27.     (SWI numbers only)
  28.  
  29.  
  30. SWI interface
  31. =============
  32.  
  33. OS_ReadSysInfo 2 (SWI &58)
  34.     Returns the current dynamically set ASIC presence flags and machine
  35.     identification.
  36.  
  37.         On entry    R0 = 2
  38.  
  39.         On exit        R0 = current IOEB ASIC presence flag
  40.                 R1 = current 82C710 presence flag
  41.                 R2 = current LCD ASIC presence flag
  42.                 R3 = low word of current 64-bit machine ID
  43.                 R4 = high word of current 64-bit machine ID
  44.  
  45.         Processor Mode    Processor is in SVC26 mode
  46.  
  47.         Interrupts    Interrupt status is not altered
  48.                 Fast interrupts are enabled
  49.  
  50.         Re-entrancy    SWI is re-entrant
  51.  
  52.  
  53. OS_ReadSysInfo -1 (SWI &58)
  54.     Restores the correct ASIC presence flags and machine identification
  55.     for this hardware.
  56.  
  57.         On entry    R0 = -1
  58.  
  59.         On exit        R0 preserved
  60.                 R1 = actual IOEB ASIC presence flag
  61.                 R2 = actual 82C710 presence flag
  62.                 R3 = actual LCD ASIC presence flag
  63.                 R4 = low word of actual 64-bit machine ID
  64.                 R5 = high word of actual 64-bit machine ID
  65.  
  66.         Processor Mode    Processor is in SVC26 mode
  67.  
  68.         Interrupts    Interrupt status is not altered
  69.                 Fast interrupts are enabled
  70.  
  71.         Re-entrancy    Re-entrancy is not defined
  72.  
  73.  
  74. OS_ReadSysInfo -2 (SWI &58)
  75.     Changes the current ASIC presence flags and machine identification
  76.     as returned by OS_ReadSysInfo 2 (SWI &58).
  77.  
  78.         On entry    R0 = -2
  79.                 R1 = new IOEB ASIC presence flag
  80.                 R2 = new 82C710 presence flag
  81.                 R3 = new LCD ASIC presence flag
  82.                 R4 = low word of new 64-bit machine ID
  83.                 R5 = high word of new 64-bit machine ID
  84.  
  85.         On exit        R0-R5 preserved
  86.  
  87.         Processor Mode    Processor is in SVC26 mode
  88.  
  89.         Interrupts    Interrupt status is not altered
  90.                 Fast interrupts are enabled
  91.  
  92.         Re-entrancy    Re-entrancy is not defined
  93.  
  94.  
  95. Command interface
  96. =================
  97.  
  98. *PokeASICs
  99.     Alters the IOEB, 82C710 and LCD ASIC presence flags as returned by
  100.     OS_ReadSysInfo 2 (SWI &58) in registers R0, R1 and R2 respectively.
  101.  
  102.         Syntax        *PokeASICs <IOEB presence flag>
  103.                 <82C710 presence flag> <LCD presence flag>
  104.  
  105.         Parameters    <IOEB presence flag>    Hexadecimal number
  106.                 <82C710 presence flag>    Hexadecimal number
  107.                 <LCD presence flag>    Hexadecimal number
  108.  
  109.         Use        Use this command with caution, as it will
  110.                 cause software to make assertions about
  111.                 available hardware which may well be false.
  112.                 Such assertions may lead to failure of the
  113.                 software, and could foreseeably result in
  114.                 harmful software or hardware malfunction.
  115.  
  116.         Example     *PokeASICs 1010100 1 0
  117.  
  118.  
  119. *PokeID
  120.     Alters the 64-bit unique machine identification as returned by
  121.     OS_ReadSysInfo 2 (SWI &58) in registers R3 (low word) and R4 (high
  122.     word).
  123.     
  124.         Syntax         *PokeID <low word> <high word>
  125.     
  126.         Parameters    <low word>        Hexadecimal number
  127.                 <high word>        Hexadecimal number
  128.  
  129.         Use        Note that this command may cause software
  130.                 that relies on a particular machine
  131.                 identification to fail.
  132.         
  133.         Example        *PokeID A4004400 50
  134.  
  135.  
  136. History
  137. =======
  138.  
  139. 0.01    Initial version which worked occasionally. ID was hardwired.
  140. 0.10    Commands and negative SWIs introduced, and mechanisms generalized.
  141.  
  142.  
  143. Acknowledgements
  144. ================
  145.  
  146. Thanks are due to Mark Wooding at Straylight for teaching me bad things like the location of the SWI kernel dispatch table, Iain Truskett for insisting that I fix version 0.01, as well as Justin Fletcher and Dave Thomas for the StrongHelp "Poor Man and Woman's PRM", which told me what the hell OS_ReadSysInfo is supposed to do.
  147.  
  148.  
  149. Copyright and Disclaimer
  150. ========================
  151.  
  152. Kasoft Software maintains copyright in this software, but explicit permission is hereby given for this particular version to be freely distrubuted (as Freeware).
  153.  
  154. IMPORTANT (Disclaimer of Liability): The software described in these notes is subject to continuous development and improvement. Kasoft Software cannot be held liable for any loss or damage arising from the use of this software, or the information given in these notes, even if Kasoft Software is aware of the possibility of such loss or damage. The software is supplied without any promise or warranty of any kind with respect to its fitness for any purpose whatsoever. The use of this software is entirely the user's own responsibility.
  155.  
  156. Suggestions for future versions of the software and these notes are welcomed. All correspondence should be addressed to:
  157.  
  158. Kasoft Software
  159. PO Box 104
  160. Shearwater 7307
  161. AUSTRALIA
  162.  
  163. Telephone (International): [61] 3 64287448
  164. Telephone (Australia): (03) 64287448
  165. e-mail: kade_fh@postoffice.utas.edu.au
  166.  
  167. The relocatable module 'PokeMachineID' was programmed by Kade Hansson. This module is thought to be suitable for use with all ARM-based computers running Acorn RISC OS version 3.50 or later. These notes document version 0.10 (29 Sep 1998). These notes or the software they document have no connection with the Acorn Computers Plc.
  168.  
  169. Kasoft is a registered trademark of Kasoft Software, and owned by Kade Hansson. Acorn and RiscPC are trademarks of Acorn Computers Plc. ARM is a trademark of Advanced RISC Machines Plc.
  170.